<#include "../base.ftl"/>
<#macro css>

</#macro>

<#macro js>

</#macro>

<#macro title>
广大物流云平台
</#macro>
<#macro script>
     var setting = {
            async: {
                enable: true,
                url: '${request.contextPath}/admin/shipVoyageTree.action',
                datatype : 'json',
                autoParam:["id","name","level","flag"]
            },
            data: {
                simpleData: {
                       enable: true
                }
            },
            callback:{
                onNodeCreated : zTreeonNodeCreated,
                onClick:zTreeClick
            }
            
        };
 
    function zTreeClick(event,treeId,treeNode){
   
    //var flag=treeNode.FLAG;
      //  alert(flag);
        var a=treeNode.id;
          //alert(a);
          a=a.replace("C","");
          
        //alert(a);
        
            
        
            jQuery("#gridTable").jqGrid('setGridParam',{
                url : "${request.contextPath}/list!list.action?voyageId="+a,
                page : 1
            });
             
            //jQuery("#gridTable").navGrid('setGridParam',{
              //  add:false
            //});
            jQuery("#gridTable").trigger('reloadGrid');
            jQuery("#gridPager").trigger('reloadGrid');
        }
        function zTreeonNodeCreated(event,treeId,treeNode){
        var treeObj=$.fn.zTree.getZTreeObj(treeId);
        var list=treeObj.getNodeByParam("level",'1');
        treeObj.expandNode(list,true,true,true);
     }

        jQuery(document).ready(function(){
            $.fn.zTree.init($("#shipTree"), setting);
        });




 
</#macro>

<#macro main>
  <div id="treediv" class="ui-widget-content ui-corner-all" style="border-style:inset; border-width:10px; border-color:Silver;margin:30px 10px 20px -30px;float:left;width:250px;">
           <ul id="shipTree" class="ztree"></ul>
  </div>
  <div id="detaildiv" style="background-color:Navy;margin:30px 10px 20px 0px;float:left;width:200px;">
           <table id="gridTable"></table>
           <div id="gridPager"></div>
  </div>
  <div class="pic_wrap"><img _src="${request.contextPath}/productImages/13.jpg" alt="联想 Yoga11 13小时超长待机" title="联想 Yoga11 13小时超长待机"><i class="ss_tejia"></i></a>
</div>




  
  
</#macro>
        
